﻿using Furion.DependencyInjection;

using System;

namespace AdminAuthority.Attributes
{
    /// <summary>
    /// 授权功能
    /// </summary>
    [SkipScan, AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
    public sealed class AuthorityPermissionAttribute : Attribute
    {
        /// <summary>
        ///
        /// </summary>
        /// <param name="name">页面/功能名称</param>
        /// <param name="actions">action</param>
        public AuthorityPermissionAttribute(string name, string actions)
        {
            this.Actions = actions;
            this.Name = name;
            //this.Controller = controller;
            //this.ControllerName = controllerName;
        }

        ///// <summary>
        ///// 控制器名称
        ///// </summary>
        //public string ControllerName { get; }

        ///// <summary>
        ///// 页面
        ///// </summary>
        //public string Controller { get; }

        /// <summary>
        /// 功能名称
        /// </summary>
        public string Name { get; }

        /// <summary>
        /// Action,多个用英文逗号隔开
        /// </summary>
        public string Actions { get; }

        /// <summary>
        /// 是否废止
        /// </summary>
        public bool IsDisuse { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string Remark { get; set; }

        /// <summary>
        /// 创建日期
        /// </summary>
        public string CreateDate { get; set; }
    }
}